{\rtf1\ansi\ansicpg936\cocoartf1344\cocoasubrtf720
{\fonttbl\f0\fnil\fcharset134 STHeitiSC-Light;\f1\fnil\fcharset0 Menlo-Regular;}
{\colortbl;\red255\green255\blue255;\red217\green11\blue0;\red180\green0\blue98;\red77\green0\blue158;
\red48\green111\blue121;\red46\green13\blue110;\red92\green38\blue153;\red29\green133\blue25;\red68\green137\blue147;
\red32\green60\blue63;\red110\green32\blue13;}
\paperw11900\paperh16840\margl1440\margr1440\vieww25100\viewh16980\viewkind0
\deftab1204
\pard\tx1204\pardeftab1204\pardirnatural

\f0\fs60 \cf0 \CocoaLigature0 \'b4\'fa\'c0\'ed\'d3\'eb\'d0\'ad\'d2\'e9\

\f1\fs50 1.
\f0 \'b7\'d6\'c7\'e5\'ce\'af\'cd\'d0\'d5\'df\'ba\'cd\'b4\'fa\'c0\'ed\'a3\'ac\'d0\'ad\'d2\'e9\'ca\'c7\'d3\'c9\'ce\'af\'cd\'d0\'d5\'df\'d6\'c6\'b6\'a8\'b5\'c4
\f1 \
2.
\f0 \'c0\'e0\'c3\'fb
\f1 +delegate  
\f0 \'b7\'bd\'b1\'e3\'c6\'e4\'cb\'fb\'c8\'cb\'b2\'e9\'d5\'d2
\f1 \
3.
\f0 \'cc\'ed\'bc\'d3\'b4\'fa\'c0\'ed\'ca\'f4\'d0\'d4
\f1   
\f0 \'b1\'dc\'c3\'e2\'cd\'fc\'bc\'c7\'cc\'ed\'bc\'d3
\f1 \
4.
\f0 \'cc\'ed\'bc\'d3\'d0\'ad\'d2\'e9\'b7\'bd\'b7\'a8
\f1  @required
\f0 \'b1\'d8\'d0\'eb\'d6\'b4\'d0\'d0
\f1  @optional
\f0 \'d1\'a1\'d4\'f1\'d6\'b4\'d0\'d0\'a3\'a8\'bf\'c9\'d6\'b4\'d0\'d0\'d2\'b2\'bf\'c9\'d2\'d4\'b2\'bb\'d6\'b4\'d0\'d0\'a3\'a9\'c8\'e7\'b9\'fb\'c4\'e3\'b2\'bb\'cc\'ed\'bc\'d3\'c7\'b0\'c3\'e6\'c1\'bd\'b8\'f6\'b9\'d8\'bc\'fc\'d7\'d6\'c4\'c7\'c3\'b4\'d0\'ad\'d2\'e9\'b7\'bd\'b7\'a8\'ca\'c7\'b1\'d8\'d0\'eb\'d6\'b4\'d0\'d0\'b5\'c4
\f1 \
//
\f0 \'ca\'c7\'b7\'f1\'d0\'e8\'d2\'aa\'b4\'ab\'d6\'b5\
\
\
\'ce\'af\'cd\'d0\'d5\'df\cf2 \'d6\'c6\'b6\'a8\'d0\'ad\'d2\'e9.h\'d6\'d0\cf0 \
\pard\tx1204\pardeftab1204\pardirnatural

\f1 \cf3 @protocol\cf0  ViewController2Delegate <\cf4 NSObject\cf0 >\
- (\cf3 void\cf0 )changeColor:(\cf4 UIColor\cf0  *)color ;\
\cf3 @end\cf0 \
\cf3 @interface\cf0  ViewController2 : \cf4 UIViewController\cf0 \
\cf3 @property\cf0  (\cf3 assign\cf0 ,\cf3 nonatomic\cf0 ) \cf3 id\cf0 <\cf5 ViewController2Delegate\cf0 >delegate ;\
\cf3 @end\
\
\pard\tx1204\pardeftab1204\pardirnatural

\f0 \cf0 \'ce\'af\'cd\'d0\'d5\'df\cf2 \'d6\'c6\'b6\'a8\'d0\'ad\'d2\'e9.m\'d6\'d0
\f1 \cf3 \
@implementation\cf0  ViewController2\
- (\cf3 void\cf0 )viewDidLoad \{\
    [\cf3 super\cf0  \cf6 viewDidLoad\cf0 ];\
    \cf3 self\cf0 .\cf7 navigationItem\cf0 .\cf7 leftBarButtonItem\cf0  = [[\cf4 UIBarButtonItem\cf0  \cf6 alloc\cf0 ] \cf6 initWithBarButtonSystemItem\cf0 :\cf6 UIBarButtonSystemItemCamera\cf0  \cf6 target\cf0 :\cf3 self\cf0  \cf6 action\cf0 :\cf3 @selector\cf0 (pressLeft)] ;\
    \cf3 self\cf0 .\cf7 view\cf0 .\cf7 backgroundColor\cf0  = [\cf4 UIColor\cf0  \cf6 whiteColor\cf0 ] ;\
\}\
- (\cf3 void\cf0 )pressLeft\
\{\
    \cf8 //
\f0 \cf8 \'ca\'d7\'cf\'c8\'c5\'d0\'b6\'cf\'b4\'fa\'c0\'ed\'ca\'c7\'b7\'f1\'c4\'dc\'b9\'bb\'cf\'ec\'d3\'a6\'d0\'ad\'d2\'e9\'b7\'bd\'b7\'a8\'a3\'ac\'c8\'e7\'b9\'fb\'cf\'ec\'d3\'a6\'d4\'d9\'bc\'cc\'d0\'f8\'d6\'b4\'d0\'d0
\f1 \cf8 \{\}
\f0 \cf8 \'d6\'d0\'b5\'c4\'b4\'fa\'c2\'eb
\f1 \cf0 \
    \cf3 if\cf0  ([\cf9 _delegate\cf0  \cf6 respondsToSelector\cf0 :\cf3 @selector\cf0 (changeColor:)])\
    \{\
        [\cf9 _delegate\cf0  \cf10 changeColor\cf0 :[\cf4 UIColor\cf0  \cf6 redColor\cf0 ]] ;\
    \}\
    [\cf3 self\cf0 .\cf7 navigationController\cf0  \cf6 popViewControllerAnimated\cf0 :\cf3 YES\cf0 ];\
\}\
\

\f0 \'b4\'fa\'c0\'ed\'d5\'df\cf2 \'d6\'b4\'d0\'d0\'d0\'ad\'d2\'e9.m\'d6\'d0
\f1 \cf0 \
- (\cf3 void\cf0 )viewDidLoad\
\{\
    [\cf3 super\cf0  \cf6 viewDidLoad\cf0 ];\
    \cf3 self\cf0 .\cf7 navigationItem\cf0 .\cf7 rightBarButtonItem\cf0  = [[\cf4 UIBarButtonItem\cf0  \cf6 alloc\cf0 ] \cf6 initWithBarButtonSystemItem\cf0 :\cf6 UIBarButtonSystemItemAdd\cf0  \cf6 target\cf0 :\cf3 self\cf0  \cf6 action\cf0 :\cf3 @selector\cf0 (pressRight)] ;\
\}\
- (\cf3 void\cf0 )pressRight\
\{\
    \cf5 ViewController2\cf0  * vc = [[\cf5 ViewController2\cf0  \cf6 alloc\cf0 ] \cf6 init\cf0 ] ;\
	
\f0 \cf2 \'c9\'e8\'d6\'c3\'b4\'fa\'c0\'ed
\f1 \cf0 \
    vc.\cf9 delegate\cf0  = \cf3 self\cf0  ;\
    [\cf3 self\cf0 .\cf7 navigationController\cf0  \cf6 pushViewController\cf0 :vc \cf6 animated\cf0 :\cf3 YES\cf0 ] ;\
\}\
\pard\tx1204\pardeftab1204\pardirnatural
\cf11 #pragma mark  
\f0 \'ca\'b5\'cf\'d6\'d0\'ad\'d2\'e9\'b7\'bd\'b7\'a8
\f1 \
\pard\tx1204\pardeftab1204\pardirnatural
\cf0 - (\cf3 void\cf0 )changeColor:(\cf4 UIColor\cf0  *)color\
\{\
    \cf3 self\cf0 .\cf7 view\cf0 .\cf7 backgroundColor\cf0  = color ;\
\}\
\
\
\
}